<?php
class AuthControl extends Control{
	public function __init(){
		//完成验证...
	}
	public function success($msg = '操作成功', $url = NULL, $time = 2, $tpl = null){
	    	if(IS_AJAX){
	    		$this->ajax(array('state'=>1,'message'=>$msg));
	    	}else{
	    		parent::success($msg,$url,$time,$tpl);
	    	}
    }
    public function error($msg = '操作失败', $url = NULL, $time = 2, $tpl = null){
    	if(IS_AJAX){
    		$this->ajax(array('state'=>0,'message'=>$msg));
    	}else{
    		parent::error($msg,$url,$time,$tpl);
    	}
    }
}